<include file="header" />
<div class="wraper" js="wapjs/base/print/js/dispatch">
	<div class="head clearfix">
		<a href="javascript:history.go(-1);" class="iconfont icon-zuo pull-left"></a>
		<span class="head-name pull-left">订单详情</span>
		<a href="javascript:history.go(-1);" class="pull-left text-right"></a>
	</div>
	<input type="hidden" name="role_id" id="role_id" value="{BEESCRM:$role_id}">
	<input type="hidden" name="conf_id" id="conf_id" value="{BEESCRM:$conf_id}">
	<div>
		<div class="lists">
			<div class="list-line clearfix">订单详情</div>
			<div class="text-12 list-line">下单人：{BEESCRM:$detailInfo.client_name}</div>
			<div class="text-12 list-line">联系方式：{BEESCRM:$detailInfo.tel}</div>
			<div class="text-12 list-line">短号：{BEESCRM:$detailInfo.subtel}</div>
			<div class="text-12 list-line">办公电话：{BEESCRM:$detailInfo.office_tel}</div>
			<div class="text-12 list-line">内网电话：{BEESCRM:$detailInfo.net_tel}</div>
			<div class="text-12 list-line">部门：{BEESCRM:$detailInfo.department_name}</div>
			<div class="text-12 list-line">详细地址：{BEESCRM:$detailInfo.address}</div>
			<div class="text-12 list-line">订单描述：{BEESCRM:$detailInfo.order_content}</div>
			<div class="text-12 list-line">是否上传文件：<if condition="$detailInfo.if_post eq 1">是<else />否</if></div>
			<!-- 如果是设计或者技术人员，则在订单中心待确认页面的订单详情中显示我要接单的按钮-->
			<if condition="$role_id eq 1">
				<if condition="$status eq 1">
					<div class="list-line small-btn text-right">
						<a href="javascript:void(0);" class="btn bg-green design" data-order_id="{BEESCRM:$detailInfo.order_id}" data-order_type="{BEESCRM:$detailInfo.order_type}" data-client_id="{BEESCRM:$detailInfo.client_id}" data-order_content="{BEESCRM:$detailInfo.order_content}" data-conf_id="{BEESCRM:$conf_id}">{BEESCRM:$button[1]}</a>
					</div>
				<elseif condition="$status eq 2" />
					<div class="list-line small-btn text-right">
						<a href="javascript:void(0);" class="btn bg-green dispatch" data-order_id="{BEESCRM:$detailInfo.order_id}" data-order_type="{BEESCRM:$detailInfo.order_type}" data-client_id="{BEESCRM:$detailInfo.client_id}" data-order_content="{BEESCRM:$detailInfo.order_content}" data-conf_id="{BEESCRM:$conf_id}">{BEESCRM:$button[2]}</a>
						<input type="hidden" name="role_id" value="{BEESCRM:$role_id}" />
					</div>
				</if>
			</if>
			<if condition="$role_id eq 2">
				<if condition="$status eq 1">
					<div class="list-line small-btn text-right">
						<a href="javascript:void(0);" class="btn bg-green dorepair"  data-order_id="{BEESCRM:$detailInfo.order_id}" data-order_type="{BEESCRM:$detailInfo.order_type}" data-client_id="{BEESCRM:$detailInfo.client_id}" data-order_content="{BEESCRM:$detailInfo.order_content}" data-conf_id="{BEESCRM:$conf_id}">{BEESCRM:$button[1]}</a>
					</div>
				<elseif condition="$status eq 2 and $detailInfo.order_type eq 3" />
					<div class="list-line small-btn text-right">
						<a href="javascript:void(0);" class="btn bg-green dispatch" data-order_id="{BEESCRM:$detailInfo.order_id}" data-order_type="{BEESCRM:$detailInfo.order_type}" data-client_id="{BEESCRM:$detailInfo.client_id}" data-order_content="{BEESCRM:$detailInfo.order_content}" data-conf_id="{BEESCRM:$conf_id}">{BEESCRM:$button[2]}</a>
						<input type="hidden" name="role_id" value="{BEESCRM:$role_id}" />
					</div>
				<elseif condition="$status eq 2 and $detailInfo.order_type eq 2" />
					<div class="list-line small-btn text-right">
						<a href="javascript:void(0);" class="btn bg-green repair" data-order_id="{BEESCRM:$detailInfo.order_id}" data-order_type="{BEESCRM:$detailInfo.order_type}" data-client_id="{BEESCRM:$detailInfo.client_id}" data-order_content="{BEESCRM:$detailInfo.order_content}" data-conf_id="{BEESCRM:$conf_id}">{BEESCRM:$button[2]}</a>
					</div>
				</if>
			</if>

			<if condition="($role_id eq 3) and ($status eq 3)">
				<div class="list-line small-btn text-right">
					<a href="javascript:void(0);" class="btn bg-green make" data-order_id="{BEESCRM:$detailInfo.order_id}" data-order_type="{BEESCRM:$detailInfo.order_type}" data-client_id="{BEESCRM:$detailInfo.client_id}" data-order_content="{BEESCRM:$detailInfo.order_content}" data-conf_id="{BEESCRM:$conf_id}">{BEESCRM:$button[2]}</a>
					<input type="hidden" name="role_id" value="{BEESCRM:$role_id}" />
				</div>
			</if>
			<if condition="($role_id eq 4) and ($status eq 4)">
				<div class="list-line small-btn text-right">
					<a href="javascript:void(0);" class="btn bg-green uploadfile" data-order_id="{BEESCRM:$detailInfo.order_id}" data-order_type="{BEESCRM:$detailInfo.order_type}" data-client_id="{BEESCRM:$detailInfo.client_id}" data-order_content="{BEESCRM:$detailInfo.order_content}" data-conf_id="{BEESCRM:$conf_id}">{BEESCRM:$button[2]}</a>
				</div>
			</if>
			<!-- 
			<div class="list-line small-btn text-right">
				<a href="#" class="btn white-btn">取消订单</a>
				<a href="#" class="btn bg-green">确认收货</a>
			</div>
			 -->
		</div>
	</div>
	<!--  
	<div class="status-box">
		<div class="status-line">
			<span class="circle bg-grey"></span>
			<div class="triangle">
				<span class="triangle-s"></span>
				<span class="triangle-b"></span>
			</div>
			<div class="status-msg">
				<p>已下单<span class="pull-right">2016/11/14 12：24</span></p>
				<p class="text-12 text-grey">已下单，请等待设计人员接单。</p>
			</div>
		</div>
		<div class="status-line">
			<span class="circle bg-grey"></span>
			<div class="triangle">
				<span class="triangle-s"></span>
				<span class="triangle-b"></span>
			</div>
			<div class="status-msg">
				<p>技术处理中<span class="pull-right">2016/11/14 12：24</span></p>
				<p class="text-12 text-grey">飞飞（设计人员）已接单，正在处理中，请耐心等待！</p>
			</div>
		</div>
		<div class="status-line">
			<span class="circle bg-grey"></span>
			<div class="triangle">
				<span class="triangle-s"></span>
				<span class="triangle-b"></span>
			</div>
			<div class="status-msg">
				<p>制作中<span class="pull-right">2016/11/14 12：24</span></p>
				<p class="text-12 text-grey">汪汪（制作人员）已接单，正在制作中，请耐心等待！</p>
			</div>
		</div>
		<div class="status-line">
			<span class="circle bg-grey"></span>
			<div class="triangle">
				<span class="triangle-s"></span>
				<span class="triangle-b"></span>
			</div>
			<div class="status-msg">
				<p>安装配送中<span class="pull-right">2016/11/14 12：24</span></p>
				<p class="text-12 text-grey">天真（配送人员）已接单，正在安装配送中，请耐心等待！</p>
			</div>
		</div>
		<div class="status-line">
			<span class="circle bg-grey"></span>
			<div class="triangle">
				<span class="triangle-s"></span>
				<span class="triangle-b"></span>
			</div>
			<div class="status-msg">
				<p>已安装配送<span class="pull-right">2016/11/14 12：24</span></p>
				<p class="text-12 text-grey">货物已安装配送完成，请及时确认！</p>
				<div class="img-box">
					<img src="/assets/base/print/images/photo.jpg"/>
					<img src="/assets/base/print/images/photo.jpg"/>
					<img src="/assets/base/print/images/photo.jpg"/>
				</div>
			</div>
		</div>
		<div class="status-line">
			<span class="circle bg-grey"></span>
			<div class="triangle">
				<span class="triangle-s"></span>
				<span class="triangle-b"></span>
			</div>
			<div class="status-msg">
				<p>已评价<span class="pull-right">2016/11/14 12：24</span></p>
				<p class="text-12 text-grey">这次的东西质量都不错，下次还会再来</p>
			</div>
		</div>
		<div class="status-line">
			<span class="circle bg-green"></span>
			<div class="triangle">
				<span class="triangle-s"></span>
				<span class="triangle-b"></span>
			</div>
			<div class="status-msg">
				<p>已结算<span class="pull-right">2016/11/14 12：24</span></p>
				<p class="text-12 text-grey">这次的东西质量都不错，下次还会再来</p>
			</div>
		</div>
	</div>
	-->
	<if condition="$role_id neq 4 and $detailInfo.order_type neq 2">
	<div class="layer-wraper dispatchuser" style="display: none;">
		<div class="main">
			<div class="container">
				<div class="lists" id="check">
					是否指派角色<span class="pull-right"><span class="text-grey" id="yesorno">是</span> <span class="iconfont icon-xuanze1 text-normal"></span></span>
				</div>
				<div class="form-list clearfix"><span class="field pull-left">角色</span>
					<select name="role" class="pull-right role-name" id="role-select">
						<option value="0">请选择角色</option>
					</select>
					<span class="iconfont icon-wodedingdan18"></span>
				</div>
				<div class="form-list clearfix"><span class="field pull-left">名称</span>
					<select name="rolename" class="pull-right role-name" id="name-select">
						<option value="0">请选择员工姓名</option>
					</select>
					<span class="iconfont icon-wodedingdan18"></span>
				</div>
			</div>
			<div class="pop-btn">
				<a href="javascript:void(0)" class="btn cancel">取消</a>
				<a href="javascript:void(0)" class="btn gray-btn error-submit" data-order_id="{BEESCRM:$detailInfo.order_id}" data-order_type="{BEESCRM:$detailInfo.order_type}" data-conf_id="{BEESCRM:$conf_id}">确定</a>

			</div>
		</div>
	</div>
	</if>
	<!--<div class="layerwraper"></div>-->
</div>

<!-- 维修类订单 如果维修完成 弹出弹窗先确认是否处理完成，给个取消和确定的按钮，取消就留在该页面，确定就改变订单状态-->
<if condition="$role_id eq 2 and $detailInfo.order_type eq 2">
	<div class="layer-wraper repair-finish" style="display:none">
		<div class="main">
			<p class="title">是否确认处理完成？</p>
			<div class="pop-btn">
				<a href="javascript:void(0)" class="btn cancel">取消</a>
				<a href="javascript:void(0)" class="btn green-btn error-submit">确定</a>
			</div>
		</div>
	</div>
</if>

<if condition="$role_id eq 4">
	<div class="upload layer-wraper" style="display: none">
		<div class="main">
			<p class="title">上传图片（可以选择不上传）</p>
			<textarea placeholder="请简要描述您的问题" id="content" value="" name="content"></textarea>
			<div class="clearfix upload-img">
				<p class="imgbox" id="selectedPicture">
					<span class="iconfont icon-tupiantianjia"></span>
					<input class="file-input" type="file" name="upload-file" id="fileupload_input" value="" />
				</p>
				<p class="imgbox">
					<img src="" class="picture" />
				</p>
			</div>

			<div class="pop-btn">
				<a href="javascript:void(0);" class="btn cancel">取消</a>
				<a href="javascript:void(0);" class="btn green-btn upload-submit" data-cut_off="{BEESCRM:$detailInfo.cut_off}" data-order_id="{BEESCRM:$detailInfo.order_id}" data-cut_off="{BEESCRM:$detailInfo.cut_off}" data-conf_id="{BEESCRM:$conf_id}">确认提交</a>
			</div>
		</div>
	</div>
</if>
<script type="text/javascript" src="/assets/base/repair/js/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="/assets/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/assets/bower_components/upload/jquery.ui.widget.js"></script>
<script type="text/javascript" src="/assets/bower_components/upload/jquery.fileupload.js"></script>
<script type="text/javascript" src="/assets/bower_components/upload/jquery.iframe-transport.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$("#fileupload_input").fileupload({
			url: "/base/common/upload",//文件上传地址，当然也可以直接写在input的data-url属性内
//			beforeSend: function () {
//				$('.load').show();
//			},
			done: function (e, result) {
				//done方法就是上传完毕的回调函数，其他回调函数可以自行查看api
				//注意result要和jquery的ajax的data参数区分，这个对象包含了整个请求信息
				//返回的数据在result.result中，假设我们服务器返回了一个json对象
				var data = $.parseJSON(result.result);
				if (data.status == 'S') {
					$('.picture').attr('src', data.url);
//					setTimeout($('.load').hide(), 3000);
				} else {
					$.alert('error', data.message);
//					setTimeout($('.load').hide(), 3000);
					return false;
				}
			}
		});
	});
</script>
<include file="footer" />